#ifndef INC_SPHERE_H
#define INC_SPHERE_H

#include "Vector3.h"
#include "Mathutil.h"

namespace gti
{

class quaternion;
class AABB;

class Sphere
{
public:
	Sphere();
	Sphere(const vector3f& point, float radius);

// get/set members
	void set(const vector3f& point, float radius);

// precise overlap tests
	// sphere sphere overlap test
	CullFlag overlap(const Sphere& sphere) const;
	// sphere triangle overlap test
	CullFlag overlap(const vector3f& v1,const vector3f& v2,const vector3f& v3) const;

// fast overlap tests

	// fast sphere sphere overlap test
	bool collide(const Sphere& sphere) const;

// render methods
	void render() const;
	void renderWire() const;

	// to do: simple primitives
	static void render(const quaternion &q, const vector3f& c, float radius);

public:
	// member variables
	vector3f center;
	float radius;
};

};//namespace gti

#endif//INC_SPHERE_H
